Prediction for post-ERCP pancreatitis in non-elderly patients with common bile duct stones: a cross-sectional study at a major Chinese tertiary hospital (2015–2023)

Background Post-ERCP pancreatitis is one of the most common adverse events in ERCP-related procedures. The purpose of this study is to construct an online model to predict the risk of post-ERCP pancreatitis in non-elderly patients with common bile duct stones through screening of relevant clinical parameters. Methods A total of 919 cases were selected from 7154 cases from a major Chinese tertiary hospital. Multivariable logistic regression model was fitted using the variables selected by the LASSO regression from 28 potential predictor variables. The internal and external validation was assessed by evaluating the receiver operating characteristic curve and the area under curve. Restricted cubic spline modelling was used to explore non-linear associations. The interactive Web application developed for risk prediction was built using the R “shiny” package. Results The incidence of post-ERCP pancreatitis was 5.22% (48/919) and significantly higher in non-elderly patients with female, high blood pressure, the history of pancreatitis, difficult intubation, endoscopic sphincterotomy, lower alkaline phosphatase and smaller diameter of common bile duct. The predictive performance in the test and external validation set was 0.915 (95% CI, 0.858–0.972) and 0.838 (95% CI, 0.689–0.986), respectively. The multivariate restricted cubic spline results showed that the incidence of pancreatitis was increased at 33–50 years old, neutrophil percentage > 58.90%, hemoglobin > 131 g/L, platelet < 203.04 or > 241.40 × 109/L, total bilirubin > 18.39 umol / L, aspartate amino transferase < 36.56 IU / L, alkaline phosphatase < 124.92 IU / L, Albumin < 42.21 g / L and common bile duct diameter between 7.25 and 10.02 mm. In addition, a web server was developed that supports query for immediate PEP risk. Conclusion The visualized networked version of the above model is able to most accurately predict the risk of PEP in non-elderly patients with choledocholithiasis and allows clinicians to assess the risk of PEP in real time and provide preventive treatment measures as early as possible.


Induction
Common bile duct stones (CBDS) are a relatively common chronic and recurrent digestive disease.The incidence of cholelithiasis is 5-15%, of which common bile duct stones account for 5-30% [1].Common bile duct stones are divided into primary stones and secondary stones according to their source, and secondary common bile duct stones are the most common cause of common bile duct stones [2].In recent years, the incidence of choledocholithiasis has been on the rise, with dietary factors and other factors changing [3].
Stone extraction by endoscopic retrograde cholangiopancreatography (ERCP) has become an ideal method for the treatment of common bile duct stones, which is safe and effective for asymptomatic and symptomatic patients, and has the advantages of less trauma, fast recovery and few complications [4].The complications after ERCP-related procedures mainly include asymptomatic hyperamylaseemia, pancreatitis, cholangitis, cholecystitis, perforation, bleeding, etc., and even death in severe cases [4].And post-ERCP pancreatitis (PEP) is one of the most common adverse events (AEs), and it has the potential to cause morbidity and mortality from clinical complications [5].There are many risk factors for PEP, mainly divided into patient-related factors and ERCP procedure-related factors.Patient-related factors include sex, age, suspected oddi sphincter dysfunction (SOD), history of pancreatitis, and common bile duct diameter, and procedural factors include difficulty intubation and so on.Although many studies have detailed risk factors for the development of PEP, the factors reported vary widely due to different intubation techniques, heterogeneous patient populations, and included indicators [6,7].
However, there is currently no established protocol to predict the risk of pancreatitis in non-elderly patients with common bile duct stones.In this study, we used the logistic regression model to explore the relationship between the clinical characteristics and PEP in nonelderly patients with CBDs to predict the risk of PEP.The model was translated to an online web that can be used by clinicians to determine the medical strategies for nonelderly patients with CBDs at high risk for PEP.

Study design and patients
This was a retrospective, single-center study conducted at the First Affiliated Hospital of USTC.The research was approved by the ethics committee of the hospital (No. 2023-RE-207) and conducted in accordance with the guidelines of the Helsinki Declaration.During the periods between January 2015 and January 2023, 7154 consecutive ERCP procedures were performed.Of these 7154 cases, patients with bile duct or pancreatic duct stent placement, other treatments such as photodynamic therapy, biopsy under spyglass, etc., common bile duct stones combined with pancreatic duct stones, acute cholangitis, unsuccessful stone removal, residual stones, > 60 years old, incomplete data, a stone size of < 3 mm were excluded (Fig. 1).None of the patients were treated with rectal NSAIDs or hydration with lactated Ringer's solution for regular use.Above all, 919 cases were included in our study.Since it was a retrospective analysis, the need for informed consent was waived.For external validation, the dataset comprised clinical data from random patients meeting the aforementioned criteria across multiple centers in Anhui Provincial, recorded from January 2021 to January 2023.The data came from the six centers of the First Affiliated Hospital of Anhui Medical University, Anhui No.2 Provincial People's Hospital, the First Affiliated Hospital of Bengbu Medical College, the Second People's Hospital of Hefei, the First Affiliated Hospital of Wannan Medical College, and the First People's Hospital of Hefei, with a total of 81 cases.

Study protocol and definitions
All ERCP procedures were conducted by the same operating and nursing team to avoid unnecessary bias.Briefly, using a catheter and guidewire, the common bile duct was cannulated under fluoroscopic guidance and performs an initial cholangiogram to delineate the anatomy by the operator.The stone removal procedure is then completed under fluoroscopy and guidewire guidance.Patient characteristics, including gender, age, BMI, HBP, DM, related medical history, surgical intervention, postoperative serology, and complications after ERCP were collected.The study endpoint was the risk prediction for the development of PEP.Difficult cannulation was defined as more than five cannulation attempts, a long bile duct diameter between 7.25 and 10.02 mm.In addition, a web server was developed that supports query for immediate PEP risk.

Conclusion
The visualized networked version of the above model is able to most accurately predict the risk of PEP in non-elderly patients with choledocholithiasis and allows clinicians to assess the risk of PEP in real time and provide preventive treatment measures as early as possible.
Fig. 1 The workflow chart of the application of online model in the prediction of post-ERCP pancreatitis (PEP) in non-elderly patients with common bile duct stones cannulation time (> 5 min), or unintentional pancreatic duct cannulation occurring more than three times [8].The definition of pancreatitis were based on the consensus criteria [9].A diagnosis of PEP was given when patients had new-onset or worsened pancreatic-type abdominal pain lasted for at least 24 h after procedure, with an increased serum amylase level of more than three times higher than the normal upper limit.

Selection and analysis of risk factors
Univariable analysis was performed to select 28 potential predictor variables for PEP based on previous related research.Multivariable logistic regression model was fitted using the variables selected by the LASSO regression.The λ value with the least binomial deviance was used for the final LASSO regression by conducting 10-fold cross validation method.Lower values on these fit statistics indicate better model fit.The association of each factor with the risk of PEP was estimated with odds ratios (ORs) and 95% CIs.Predictive power was assessed by evaluating the receiver operating characteristic (ROC) curve and the area under curve.Restricted cubic spline modelling was used to explore non-linear associations.

Statistical analysis
All statistics were analyzed in R software (version 4.0.2;http://www.Rproject.org).The continuous variables were compared by a two-sided paired t-test.For categorical variables, the Person's χ 2 test was used to compare the frequency distributions between 2 groups.

Online web application
After validation, the best performance model consisting of multiple clinical indicators was used as the web-based risk calculator.The interactive Web application developed for risk prediction of PEP in CBD Patients was built using the R "shiny" package.The related workflow chart was displayed in Fig. 1.

Clinical demographics and characteristics of non-elderly patients with CBDs
The data of 919 non-elderly patients with CBDs was summarized, and the demographic and clinical characteristics are shown in Table 1.The mean age of all patients was 46.61 ± 10.63 years, and the female to male ratio in this subgroup was 1.30:1 (520 vs. 399), respectively.The

Screening of relevant clinical parametric variables
In order to potentially clinically used the risk model and predicted more precisely the occurrence of PEP.A total of 22 non-zero coefficients were selected from 28 variables in Table 1 by the lasso logistic regression model for the minimum Lambda value (0.002403).These 22 features are considered important for predicting the target variable (Fig. 2).The entire data set was partitioned into independent sets of training (80%; 736) and test (20%; 183) data, respectively, for model development and validation.Data were randomly sampled and repeated until no significant differences were observed in the above clinical variables between the two datasets (Table 2).

Online web application
The regression model based on the coefficients of each variable was used to create a web-based risk prediction calculator.A web server based on the Shiny application in R was developed that supports query for immediate PEP Fig. 2 The screening of relevant variables was determined by lasso logistic regression risk: https://jamesjin63.shinyapps.io/Shiny_PEP/.The related flow chart of the work was shown in Fig. 6.

Discussion
As an invasive operation, ERCP is diverse, complex and difficult, and complications such as PEP, bleeding, perforation, and postoperative reinfection are important factors affecting the outcome and prognosis of ERCP [10].
The overall incidence of all postoperative complications of ERCP worldwide is 6-15%, with PEP remaining the most common complication [11].A 2023 meta-analysis of PEP morbidity and mortality based on 145 RCTs (n = 19,038) showed an overall incidence of PEP of 10.2% and an incidence of 14.1% in high-risk patients [12].In this study, as one of the first centers in China to carry out ERCP-related procedures, our incidence of PEP was 5.22%, which was lower than the overall incidence worldwide.Mild PEP may lead to clinical symptoms such as mild abdominal pain and prolonged hospital stay, while severe cases may lead to pancreatic edema, pancreatic necrosis, systemic inflammatory response syndrome (SIRS), multiple organ failure, and even death [13].Therefore, identifying risk factors for the development  of PEP and early intervention and treatment are key to reducing morbidity and mortality.The risk factors for PEP that have been recognized by the existing results have been mentioned above, but there are still differences in the underlying disease, related medical history, preoperative serology, anatomical relationships and so on.Multiple risk factors for PEP have a synergistic effect when co-existing, rather than a simple probability, and the incidence of PEP can be as high as 30-50% when multiple risk factors are combined [14].
Previous studies have shown that younger patients are more likely to complicate PEP, but cut-off values vary between studies, mostly 50-60 years old or younger [15,16].Pancreatic exocrine function increases linearly before age 43 and begins to decline gradually after age 43, resulting in reduced response to mechanical injury stimuli such as ERCP [17].Based on this, this study excluded patients over 60 years of age to further investigate the risk factors for PEP in non-elderly patients, and the multivariate RCS results showed that patients aged 33-50 years had a higher risk of developing PEP.This information is reported for the first time for the age range of high risk of PEP in non-eldly patients.
Female, the history of pancreatitis, difficult intubation and EST in this study are all risk factors for PEP, which have been reported in multiple studies [18][19][20].Interestingly, we found that patients with HBP were more likely to develop PEP in this study.The main reason for considering is that most hypertensive patients have abnormal lipid metabolism, and patients with hyperlipidaemia had a significantly increased risk of PEP [21].It has been reported that common bile duct less than 10 mm is a risk factor for PEP [22], which is basically consistent with the high-risk of PEP in patients with a diameter of common bile duct between 7.25 and 10.02 mm in this study.The diameter of the common bile duct is an indicator of biliary obstruction, and the increase in the diameter indicates that there is obstruction at the end of the biliary tract, and the widened common bile duct relieves the pressure in the bile duct and pancreatic duct to some extent, thereby reducing the return of bile or pancreatic juice and reducing the chance of PEP.To date, To summarize, many clinical parameters set as prediction variables are already known to favor PEP in clinical, but these parameters are not independent.Therefore, we established a simple website-based risk prediction tool using demographic and clinical variables to evaluate the probability of PEP in non-eldly patients with CBDs, aid in clinical decision making, and ultimately improve more patients to benefit from the model.Our purpose is to provide real-time prediction of PEP incidence to clinicians clearly and easily so that clinicians can administer preventive treatment of PEP as early as possible through our visualization webpage.
This study confirmed that it has good predictive performance according to internal and external verification and can find high-risk groups of PEP according to relevant data, and give preventive measures and treatment plans before PEP, thereby slowing down the progression of PEP.Limitations are inevitable in retrospective, observational studies and we need prospective, multicenter studies with larger sample sizes to validate the external applicability of this model.
In conclusion, the incidence of post-ERCP pancreatitis was 5.22% (48/919) and significantly higher in non-elderly patients with female, HBP, the history of pancreatitis, difficult intubation, EST, lower ALP and smaller diameter of common bile duct.And we screened 22 non-zero coefficients from 28 relevant variables and constructed a regression model to predict the risk of PEP in non-elderly patients with CBDs with high accuracy by using internal and external model validation.The predictive performance in the test data and external test set was 0.915 and 0.838, respectively.We adopted an innovative approach to clarify the relationship between age, HB, TB, AST, diameter of common bile duct and other related nonlinear clinical parameters and PEP, and further refined the numerical intervals of high PEP risk by multivariate RCS.A visualized web version will allow clinicians to assess the risk of PEP in patients with CBDs in real time based on the above results and provide preventive treatment measures as early as possible.

Fig. 3 Fig. 5 Fig. 4
Fig. 3 Receiver operating characteristic (ROC) curve plot in the train (A) and test (B) data; ROC curve plot in the external test set (C)

Table 1
Clinicopathologic characteristics of cohort in PEP patients with CBDs

Table 2
Clinical data of training and validation data set in non-elderly patients with common bile duct stones

Table 3
Crude and adjusted analysis of PEP patients in the training set with categorical variables a Performed with a univariable logistic regression model.b Performed with a multivariable logistic regression model The web server was developed for immediate PEP risk by 22 features Page 10 of 11 Yan et al.BMC Medical Informatics and Decision Making (2024) 24:143